using UnityEngine;
using System.Collections;

public class PanningParser : MonoBehaviour{
	private string[] strPan;
	private int strPanIndex;
	public PanningParser()
	{
		strPanIndex = 0;
	}
	public void SetString(string _strPan)
	{
		strPan = _strPan.Split(new char[]{'$'});
	}
	public bool NextPanningString()
	{
//		print(strPan.Length);
		if( strPanIndex.Equals( strPan.Length -1) ){
			strPanIndex = 0;
			return false;
		}
		return true;
	}
	public Vector3 GetValue()
	{	
		string[] SplitString = strPan[strPanIndex].Split(',');
		
		strPanIndex++;
		print ( SplitString[0] + " / " + SplitString[1] + " / " + SplitString[2]);
		return new Vector3(	float.Parse(SplitString[0]) ,
							float.Parse(SplitString[1]) , 
							float.Parse(SplitString[2]) );
	}
}
